import typescript from "@rollup/plugin-typescript";
import commonJs from '@rollup/plugin-commonjs'
import { nodeResolve } from "@rollup/plugin-node-resolve";
import vuePlugin from 'rollup-plugin-vue'
import externalGlobals from "rollup-plugin-external-globals";
import VueSetupExtend from 'unplugin-vue-setup-extend/rollup'
import less from 'rollup-plugin-less'
import {resolve} from "path";

export default {
    // input: "./src/plugin/route-plan/index.ts",
    input: './src/plugin/route-plan/route-plan.vue',
    output: {
        file: "dist/index.es.js",
        format: "es",
        name: 'RoutePlan',
        globals: 'RoutePlan'
    },
    plugins: [
        typescript({
            declaration: true,
            declarationDir: "./types",
        }),
        VueSetupExtend(),
        // externalGlobals({
        //     vue: 'vue',
        //     cesium: "Cesium"
        // }),
        vuePlugin(),
        commonJs(),
        nodeResolve(),
        less()
    ],


    external: ['cesium', 'dayjs', 'vue'],
};
